From: Juergen Gross Date: Wed, 23 Aug 2017 17:34:00 +0000 (+0200) Subject: xen/arch/x86/mm.c: let custom parameter parsing routines return errno X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1591 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2ff6e29af600a0f89cb4420e0892142cac9b4e92;p=xen.git xen/arch/x86/mm.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/arch/x86/mm.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 9a643af61d..1f60d6bd39 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -179,14 +179,20 @@ static uint32_t base_disallow_mask; L1_DISALLOW_MASK : (L1_DISALLOW_MASK & ~PAGE_CACHE_ATTRS)) static s8 __read_mostly opt_mmio_relax; -static void __init parse_mmio_relax(const char *s) + +static int __init parse_mmio_relax(const char *s) { if ( !*s ) opt_mmio_relax = 1; else opt_mmio_relax = parse_bool(s, NULL); if ( opt_mmio_relax < 0 && strcmp(s, "all") ) + { opt_mmio_relax = 0; + return -EINVAL; + } + + return 0; } custom_param("mmio-relax", parse_mmio_relax);